// 图片转base64
export function getBase64(file) {
    return new Promise((resolve, reject) => {
        let reader = new FileReader()
        let fileResult = ''
        reader.readAsDataURL(file)
        reader.onload = () => {
            fileResult = reader.result
        }
        reader.onerror = err => {
            reject(err)
        }
        reader.onloadend = () => {
            resolve(fileResult)
        }
    })
}